package com.cosmo.prototype.demo03;



public class test {
    public static void main(String[] args) throws CloneNotSupportedException {
        Teacher obj1 = new Teacher();
        obj1.setName("张三");
        obj1.setStudent(new Student("王大锤","宇动源学院"));
        Teacher obj2 = (Teacher) obj1.clone();
        System.out.println("obj1==obj2?" + (obj1 == obj2));
        System.out.println("obj2.getStick()==obj1.getStick()?" + (obj2.getStudent()==obj1.getStudent()));
        System.out.println(obj2.getStudent().toString());
    }
}
